package com.shuyun.config;

import org.apache.rocketmq.spring.autoconfigure.RocketMQProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.aliyun.teaopenapi.models.Config;

/**
 * @description: RocketMQ配置
 * @author: shuai.chen@shuyun.com
 * @date: 2022/10/9 3:08 PM
 **/
@Configuration
public class RocketMQConfig {

    /**
     * 阿里云访问客户端
     * 
     * @return 阿里云访问客户端
     * @throws Exception
     */
    @Bean
    public com.aliyun.ons20190214.Client createClient() throws Exception {
        Config config = new Config()
            // 您的 AccessKey ID
            .setAccessKeyId("LTAI5tCodTFHA63qjZkDudLB")
            // 您的 AccessKey Secret
            .setAccessKeySecret("qyPPsY2BC5zG4zTEqIkkdTR08bIWY9");
        // 访问的域名
        config.endpoint = "ons.cn-zhangjiakou.aliyuncs.com";
        return new com.aliyun.ons20190214.Client(config);
    }

}
